/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package logic;

import daw.entidades.*;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.classic.Session;

/**
 *
 * @author harry
 */
public class CinemaHelper {
     private final Session session;

    public CinemaHelper() {
        this.session = HibernateUtil.getSessionFactory().getCurrentSession();
    }
    
    public List<Usuario> getTeatros() {
       
        
        org.hibernate.Transaction tx = session.beginTransaction();
        Query q = session.createQuery ("from Usuario");
        List<Usuario> t = q.list();
        
        //List<Cancion> top =ordenadas.subList(0, 10);

        return t;
    }
}

